const identicon = require('identicon');
const fs = require('fs');
const crypto = require('crypto');

let hash = crypto.createHash('md5');
hash.update('Bennie Zhang');

var buffer = identicon.generateSync({id: hash.digest('img'), size: 150});

fs.writeFileSync('./test.png', buffer);

console.log(__dirname);
